package com.cntv.viewmodeldemo.onlyviewmodel;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

/**
 * Created By Mahongyin
 * Date    2020/9/17 15:20
 * 未使用livadata
 */
public class MyViewModel extends ViewModel {

    private int number=0;

    public int getNum() {
        return number;
    }

    public void add(int n) {
        number+=n;
    }
}
